<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.lmpop.trade.ti_goods.*" %>
<%@ page import="java.util.*" %>




<%
	
	request.setCharacterEncoding("UTF-8");	
			
	String s_cust_id = "";	
	if( session.getAttribute("session_cust_id") != null ){
		s_cust_id = session.getAttribute("session_cust_id").toString();
	}
	
	Ti_goodsInfo ti_goodsInfo = new Ti_goodsInfo();

	Hashtable pMap =new Hashtable();
    String  s_goods_name="",s_class_attr="",s_goods_sate="",s_start_date="",s_end_date="";
    String  s_cust_name="",s_shelf="",s_recom="",s_s_price="",s_q_price="",s_fresh="",s_appman="";                          
    if(request.getParameter("s_goods_name")!=null && !request.getParameter("s_goods_name").equals("") )
    {
      s_goods_name = request.getParameter("s_goods_name").toString();
      pMap.put("s_goods_name",s_goods_name);  
    }
    if(request.getParameter("s_class_attr")!=null && !request.getParameter("s_class_attr").equals("") )
   {
     s_class_attr = request.getParameter("s_class_attr").toString();
     pMap.put("s_class_attr",s_class_attr);  
   }

  
    pMap.put("m_state","a");
  
	List list = ti_goodsInfo.getGoodsList(pMap);
                                            
	
		String message = "";
		int listsize = 0;
		if(list!=null && list.size()>0){
			listsize = list.size();

		  		for(int i=0;i<list.size();i++){
		  			Hashtable map = (Hashtable)list.get(i);
		  			String goods_id="",goods_no="",cust_id="",class_attr="",brand_id="",goods_name="",member_price="",org_price="",market_price="",sale_price="";
		  			String send_inter="",buy_inter="",weight="",stock_in="",stock_num="",stock_out="",stock_down="",price_unit="",state_code="",state_date="",ship_fare="",keywords="",outline="",goods_desc="",remark="",link_goods="",link_fit="",attr_desc="",rsrv_str1="",rsrv_str2="",rsrv_str3="",rsrv_str4="",rsrv_str5="",rsrv_str6="",publish_date="",publish_user_id="";
		  			if(map.get("goods_id")!=null) 
						goods_id = map.get("goods_id").toString();
				  	
					if(map.get("goods_no")!=null) goods_no = map.get("goods_no").toString();
				  	if(map.get("cust_id")!=null) cust_id = map.get("cust_id").toString();
				  	if(map.get("class_attr")!=null) class_attr = map.get("class_attr").toString();
                    if(map.get("sale_price")!=null) sale_price = map.get("sale_price").toString();
                    if(map.get("send_inter")!=null) send_inter = map.get("send_inter").toString();
				  	

				  	if(map.get("brand_id")!=null) brand_id = map.get("brand_id").toString();
				  	if(map.get("goods_name")!=null)
				  	{
				  	    goods_name = map.get("goods_name").toString();
					    if(goods_name.length()>32)
					    {
						   goods_name = goods_name.substring(0,32);              
					    }
                    }				  	
                         
					message = message + "<option value=" + goods_id+ ">" + goods_name + "</option>";				

		  		}
		 }
		response.getWriter().write(message);
	%>
	

